╔═══════════════════════════════════════════════════════════════════════════╗
║                                                                           ║
║                     🤖 WHATSDESK PRO - CUSTOMER SERVICE BOT 🤖           ║
║                                                                           ║
║              The ONLY WhatsApp Bot with Complete CRM System              ║
║                                                                           ║
╚═══════════════════════════════════════════════════════════════════════════╝

Hi there! I am Mauro Gashfix, and I built this project to revolutionize customer 
service on WhatsApp with professional-grade automation and multi-language support.

═══════════════════════════════════════════════════════════════════════════════

📋 WHAT IS WHATSDESK PRO?
═══════════════════════════════════════════════════════════════════════════════

WhatsDesk Pro is THE ONLY customer service bot for WhatsApp that combines:

✅ Complete Ticket Management System
   - Open, assign, and close support tickets
   - Priority levels and automatic assignment
   - Full ticket history and statistics

✅ Real-Time Conversations with Customers
   - Live chat between clients and agents
   - Agent transfer system
   - Automatic notifications and reminders
   - Timeout management for inactive tickets

✅ Multi-Language Support (100+ Languages!)
   - Automatic language detection by country code
   - Real-time translation using Google Cloud Translate
   - Clients and agents communicate in their native language
   - Seamless conversation flow across language barriers

✅ Professional Agent Management
   - Multiple agent support with individual statistics
   - Customizable agent names
   - Performance tracking (daily/weekly/monthly)
   - Active/inactive status control

✅ Business Hours Configuration
   - Set your working hours and timezone
   - Automatic out-of-office messages
   - Configurable business days

✅ Media & File Support
   - Images, videos, audio, documents
   - Configurable file size limits

═══════════════════════════════════════════════════════════════════════════════

🚀 GETTING STARTED
═══════════════════════════════════════════════════════════════════════════════

PREREQUISITES:
1. Node.js installed (v20 or higher)
2. WhatsApp account with phone number
3. Google Cloud Translate API credentials (for multi-language support) optional but recommended for translation service

INSTALLATION STEPS:

1. Install dependencies:
   npm install

2. Configure your environment:
   - Copy .env.example to .env
   - Edit .env with your settings:
     * GOOGLE_PROJECT_ID (your Google Cloud project)
     * GOOGLE_APPLICATION_CREDENTIALS (path to credentials JSON)
     * BOT_NAME (your bot's name)
     * COMPANY_NAME (your business name)
     * ADMIN_NUMBERS (agent phone numbers, comma-separated)
     * TIMEZONE, BUSINESS_HOURS_START, BUSINESS_HOURS_END

3. Start the bot:
   npm start

4. Scan QR Code or use phone authentication when prompted

5. Bot is ready! 🎉

═══════════════════════════════════════════════════════════════════════════════

💬 AVAILABLE COMMANDS
═══════════════════════════════════════════════════════════════════════════════

FOR CLIENTS:
- /open ticket - Open a new support ticket
- /send - Send message to agent
- /change language - Change your preferred language
- /help - See the available commands

FOR AGENTS/ADMINS:
- /listar tickets - List all open tickets
- /atender [ticket_id] - Attend to a specific ticket
- /fechar ticket [ticket_id] - Close a ticket
- /transfer [ticket_id] - Transfer ticket to another agent
- /stats - View statistics
- /add agent - Register new agent
- /remove agent - Deactivate agent
- /help - See the available commands
- /adminhelp - See the available admin commands

═══════════════════════════════════════════════════════════════════════════════

🌟 KEY FEATURES EXPLAINED
═══════════════════════════════════════════════════════════════════════════════

TICKET SYSTEM:
- Automatically assigns ticket numbers
- Tracks ticket status (open/in progress/closed)
- Maintains conversation history
- Generates statistics and reports

REAL-TIME CHAT:
- Direct messaging between clients and assigned agents
- Instant notifications
- Message routing based on ticket assignment
- Automatic timeout handling

MULTI-LANGUAGE MAGIC:
- Client from Spain? Messages auto-translate to Spanish
- Agent speaks English? Bot translates everything
- Supports 100+ languages automatically
- Uses Google Cloud Translate for accuracy

SMART NOTIFICATIONS:
- Agents get notified of new tickets
- Timeout alerts for pending responses
- Transfer notifications
- Business hours reminders

═══════════════════════════════════════════════════════════════════════════════

🛠️ TECHNICAL STACK
═══════════════════════════════════════════════════════════════════════════════

- WPPConnect: WhatsApp Web connection
- Google Cloud Translate: Real-time translation
- Better-SQLite3: Fast local database
- Moment-timezone: Timezone management
- Node.js: Runtime environment

═══════════════════════════════════════════════════════════════════════════════

⚙️ ADVANCED CONFIGURATION
═══════════════════════════════════════════════════════════════════════════════

Database: ./data/bot.db (SQLite)
Session: ./tokens/[SESSION_NAME]
Config Files:
  - config/config.js - Main configuration
  - config/locales.json - Translation strings
  - config/agent-names.json - Agent name pool

Scripts:
  - npm run dev - Development mode with auto-restart
  - npm run prod - Production mode with PM2
  - npm run reset-session - Clear WhatsApp session
  - npm run reset-database - Recreate database

═══════════════════════════════════════════════════════════════════════════════

💎 WHY WHATSDESK PRO IS UNIQUE
═══════════════════════════════════════════════════════════════════════════════

This is the ONLY WhatsApp bot that combines:
  ✓ Professional ticket management
  ✓ Real-time agent-client conversations
  ✓ Automatic multi-language translation
  ✓ Complete CRM capabilities
  ✓ Business-ready features

Perfect for:
  • Customer support teams
  • E-commerce businesses
  • Service providers
  • International companies
  • Small to medium businesses

═══════════════════════════════════════════════════════════════════════════════

💰 SUPPORT & DONATIONS
═══════════════════════════════════════════════════════════════════════════════

If you need support, have questions, or want to support this project with a 
donation, you can reach me on Discord:

Discord: @maurogashfix

Your support helps me continue developing and improving WhatsDesk Pro!

═══════════════════════════════════════════════════════════════════════════════

⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════════════════════

- Read this entire file before using the application
- Make sure to configure .env file properly
- Keep your Google Cloud credentials secure
- This project is provided as-is for business and personal use
- Requires active internet connection
- WhatsApp account must remain active

═══════════════════════════════════════════════════════════════════════════════

📜 DISCLAIMER
═══════════════════════════════════════════════════════════════════════════════

This is an independent project and is NOT affiliated with, endorsed by, or 
connected to WhatsApp Inc., Meta Platforms, Inc., or Google LLC.

Use at your own risk. The developer is not responsible for any issues, bans, 
or problems that may arise from using this bot.

Always comply with WhatsApp's Terms of Service.

═══════════════════════════════════════════════════════════════════════════════

Thank you for choosing WhatsDesk Pro!
Your customers deserve the best support experience. 🚀

═══════════════════════════════════════════════════════════════════════════════

Built with ❤️ by Mauro Gashfix
Discord: @maurogashfix

© 2024 WhatsDesk Pro - All Rights Reserved